{
  "id": 9,
  "gridPos": {
    "x": {{ PANELS.cpu_usage_guage.gridPos.x }},
    "y": {{ PANELS.cpu_usage_guage.gridPos.y }},
    "w": {{ PANELS.cpu_usage_guage.gridPos.w }},
    "h": {{ PANELS.cpu_usage_guage.gridPos.h }}
  },
  "type": "gauge",
  "title": "CPU usage",
  "datasource": "InfluxDB",
  "pluginVersion": "8.2.1",
  "links": [],
  "fieldConfig": {
    "defaults": {
      "thresholds": {
        "mode": "absolute",
        "steps": [
          {
            "color": "rgba(50, 172, 45, 0.97)",
            "value": null
          },
          {
            "color": "rgba(237, 129, 40, 0.89)",
            "value": 70
          },
          {
            "color": "rgba(245, 54, 54, 0.9)",
            "value": 80
          }
        ]
      },
      "mappings": [
        {
          "options": {
            "match": "null",
            "result": {
              "text": "N/A"
            }
          },
          "type": "special"
        }
      ],
      "color": {
        "mode": "thresholds"
      },
      "max": 100,
      "min": 0,
      "unit": "percent"
    },
    "overrides": []
  },
  "interval": "30",
  "options": {
    "reduceOptions": {
      "values": false,
      "calcs": [
        "lastNotNull"
      ],
      "fields": ""
    },
    "orientation": "horizontal",
    "showThresholdLabels": false,
    "showThresholdMarkers": true,
    "text": {}
  },
  "targets": [
    {
      "dsType": "influxdb",
      "groupBy": [
        {
          "params": [
            "$__interval"
          ],
          "type": "time"
        },
        {
          "params": [
            "null"
          ],
          "type": "fill"
        }
      ],
      "measurement": "cpu",
      "policy": "default",
      "refId": "A",
      "resultFormat": "time_series",
      "select": [
        [
          {
            "params": [
              "usage_idle"
            ],
            "type": "field"
          },
          {
            "params": [],
            "type": "last"
          },
          {
            "params": [
              "* -1 + 100"
            ],
            "type": "math"
          }
        ]
      ],
      "tags": [
        {
          "key": "host",
          "operator": "=",
          "value": "$servername"
        },
        {
          "condition": "AND",
          "key": "cpu",
          "operator": "=",
          "value": "cpu-total"
        }
      ],
      "orderByTime": "ASC"
    }
  ],
  "maxDataPoints": null,
  "cacheTimeout": null
}
